<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.cms.*" %>

<%@ include file="../init_include.jsp" %>

<%
	int check_rst=Permission.accept(dbi,session,request,"sysop","tree","catid","000000010"); 	
	if (check_rst!=Permission.CHECK_RST_SUCCESS) {
		dbi.closeAll();
		if (check_rst==Permission.CHECK_RST_DENY)
			response.sendRedirect("../deny.html");
		else
			response.sendRedirect("../index.jsp");
		return;		
	}	
	
	int subCategoryNum;
	String sql="";

	subCategoryNum=Integer.parseInt(request.getParameter("subCategoryNum"));

	for (int i=0;i<subCategoryNum;i++)
	{			
		if (request.getParameter("checkbox"+i)!=null) {
				if (request.getParameter("text"+i)!=null) {
					sql ="update sys_category set ordernum="+request.getParameter("text"+i);
					sql+=" where id="+request.getParameter("checkbox"+i);
					dbi.execute(sql);						
				}
		}		
	}
	if(subCategoryNum>0) 
		TreeApplication.modTree();	
%>
<script Language="JavaScript" src="../script/Ion_Show.js"></script> 
<script language="javascript">
	closewindow(0);
</script>	
<%@ include file="../init_free.jsp" %>
